package com.hp.idempotence.v3.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.hp.idempotence.v3.model.Goods;

@Repository
public interface GoodsRepository extends  JpaRepository<Goods, Long> {

	@Query(value="select * from goods  where id = ? for update ",nativeQuery=true)
	Goods getGoodAndLock(long l);

}
